﻿/************************************\
 *   ___                            *
 *  /                          /    *
 * (___ |  ___  ___       ___ (___  *
 * |    | |   )|___)| / )|___)|   ) *
 * |    | |    |__  |/|/ |__  |__/  *
 *                                  *
 * FireWeb    C# OpenSource Browser *
\************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace FireWeb
{
    static class Program
    {
        /// <summary>
        /// Punto di ingresso principale dell'applicazione.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            try
            {
                switch (args[0])
                {
                    case "webtab":
                        {
                            Application.Run(new Pages.Web(int.Parse(args[1]), args[2], int.Parse(args[3])));
                            break;
                        }
                    case "websource":
                        {
                            Application.Run(new Pages.Source(int.Parse(args[1]), args[2], int.Parse(args[3]), args[4]));
                            break;
                        }
                    default:
                        {
                            MessageBox.Show(args[0]);
                            Application.Run(new App());
                            break;
                        }
                }
            }
            catch
            {
                Application.Run(new App());
            }
        }
    }
}
